package com.ygxsk.carhome.ui.archive;

import android.os.Parcel;
import android.os.Parcelable;

import com.ygxsk.carhome.response.ArchivesManageFileVo;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/*
 * @Author:itchenqi175@163.com
 * @Time:2023-08-13  17:38
 * @Description: 需要上传的合同信息 archivesManageList 上传的key值内容
 */
public class ArchivesManageSingleUpLoad implements Parcelable {
    /**
     * archiveTypeId : 1
     * archiveNo :
     * amount :
     * signingDate :
     * carBrand :
     * partyA :
     * brandModel :
     * archivesManageFileVoList : [{"filePath":""}]
     */

    //    {
//            "archiveTypeId": 1, //合同类型
//            "archiveNo": "", //合同编号
//            "amount": "", //合同金额
//            "signingDate": "", //签订时间
//            "carBrand": "", //品牌
//            "partyA": "", //购车人
//            "brandModel": "", //品牌型号
//            "archivesManageFileVoList": [
//        {
//            "filePath": "" //合同附件路径
//        }
//] //合同附件管理
//    }


    //这条合同的id信息 :特别备注：上传不用，只是在展示合同详情用到；
    private String archivesId;
    //合同类型
    private String archiveTypeId;
    //合同类型的名称
    private String archivesTypeName;

    //合同编号
    private String archiveNo;
    //合同金额的 BigDecimal 格式
    private BigDecimal amount;

    //签约金额-字符串格式
    private String amountString;
    //签约日期
    private String signingDate;
    //车辆 品牌，奔驰 宝马等
    private String carBrand;

    //车辆品牌的名称：
    private String carBranchName;

    //签约人
    private String partyA;
    //车辆品牌
    private String brandModel;

    //合同中间携带的附件
    private List<ArchivesManageFileVo> archivesManageFileVoList = new ArrayList<>();

    public String getArchivesId() {
        return archivesId;
    }

    public void setArchivesId(String archivesId) {
        this.archivesId = archivesId;
    }

    public String getCarBranchName() {
        return carBranchName;
    }

    public void setCarBranchName(String carBranchName) {
        this.carBranchName = carBranchName;
    }

    public String getArchivesTypeName() {
        return archivesTypeName;
    }

    public void setArchivesTypeName(String archivesTypeName) {
        this.archivesTypeName = archivesTypeName;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getAmountString() {
        return amountString;
    }

    public void setAmountString(String amountString) {
        this.amountString = amountString;
    }

    public String getArchiveTypeId() {
        return archiveTypeId;
    }

    public void setArchiveTypeId(String archiveTypeId) {
        this.archiveTypeId = archiveTypeId;
    }

    public String getArchiveNo() {
        return archiveNo;
    }

    public void setArchiveNo(String archiveNo) {
        this.archiveNo = archiveNo;
    }


    public String getSigningDate() {
        return signingDate;
    }

    public void setSigningDate(String signingDate) {
        this.signingDate = signingDate;
    }

    public String getCarBrand() {
        return carBrand;
    }

    public void setCarBrand(String carBrand) {
        this.carBrand = carBrand;
    }

    public String getPartyA() {
        return partyA;
    }

    public void setPartyA(String partyA) {
        this.partyA = partyA;
    }

    public String getBrandModel() {
        return brandModel;
    }

    public void setBrandModel(String brandModel) {
        this.brandModel = brandModel;
    }

    public List<ArchivesManageFileVo> getArchivesManageFileVoList() {
        return archivesManageFileVoList;
    }

    public void setArchivesManageFileVoList(List<ArchivesManageFileVo> archivesManageFileVoList) {
        this.archivesManageFileVoList = archivesManageFileVoList;
    }

    //    public List<ArchivesManageFileVoListBean> getArchivesManageFileVoList() {
//        return archivesManageFileVoList;
//    }
//
//    public void setArchivesManageFileVoList(List<ArchivesManageFileVoListBean> archivesManageFileVoList) {
//        this.archivesManageFileVoList = archivesManageFileVoList;
//    }

//    public static class ArchivesManageFileVoListBean {
//        /**
//         * filePath :
//         */
//        private String filePath;
//
//        public String getFilePath() {
//            return filePath;
//        }
//
//        public void setFilePath(String filePath) {
//            this.filePath = filePath;
//        }
//    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.archiveTypeId);
        dest.writeString(this.archiveNo);
        dest.writeSerializable(this.amount);
        dest.writeString(this.amountString);
        dest.writeString(this.signingDate);
        dest.writeString(this.carBrand);
        dest.writeString(this.partyA);
        dest.writeString(this.brandModel);
        dest.writeTypedList(this.archivesManageFileVoList);
    }

    public void readFromParcel(Parcel source) {
        this.archiveTypeId = source.readString();
        this.archiveNo = source.readString();
        this.amount = (BigDecimal) source.readSerializable();
        this.amountString = source.readString();
        this.signingDate = source.readString();
        this.carBrand = source.readString();
        this.partyA = source.readString();
        this.brandModel = source.readString();
        this.archivesManageFileVoList = source.createTypedArrayList(ArchivesManageFileVo.CREATOR);
    }

    public ArchivesManageSingleUpLoad() {
    }

    protected ArchivesManageSingleUpLoad(Parcel in) {
        this.archiveTypeId = in.readString();
        this.archiveNo = in.readString();
        this.amount = (BigDecimal) in.readSerializable();
        this.amountString = in.readString();
        this.signingDate = in.readString();
        this.carBrand = in.readString();
        this.partyA = in.readString();
        this.brandModel = in.readString();
        this.archivesManageFileVoList = in.createTypedArrayList(ArchivesManageFileVo.CREATOR);
    }

    public static final Parcelable.Creator<ArchivesManageSingleUpLoad> CREATOR = new Parcelable.Creator<ArchivesManageSingleUpLoad>() {
        @Override
        public ArchivesManageSingleUpLoad createFromParcel(Parcel source) {
            return new ArchivesManageSingleUpLoad(source);
        }

        @Override
        public ArchivesManageSingleUpLoad[] newArray(int size) {
            return new ArchivesManageSingleUpLoad[size];
        }
    };
}



